import {Tabbar, TabbarItem} from "@antmjs/vantui";
import {Component} from 'react'
import {inject, observer} from "mobx-react";

export interface ZwxTabbarProps {
}

@inject('zwxTabBarStore')
@observer
export default class ZWXTabBar extends Component<ZwxTabbarProps> {
  render() {
    const {zwxTabBarStore} = this.props;
    console.log(zwxTabBarStore)

    return <Tabbar active={zwxTabBarStore.activeTab} onChange={(e) => zwxTabBarStore.setActiveTab(e.detail)}>
      <TabbarItem icon='home-o'>首页</TabbarItem>
      <TabbarItem icon='search'>
        购物车
      </TabbarItem>
      <TabbarItem icon='setting-o'>
        我的
      </TabbarItem>
    </Tabbar>
  }
}
